 <{extends file="<{$tempdir}>/public/wxsite.html"}>  
<{block name=extendcss}> 
  <link rel="stylesheet"  href="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/css/weixinlunbo.css">   

<link rel="stylesheet"  href="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/css/public.css">   
 <link rel="stylesheet"  href="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/css/shoplist.css">   
 <style>
 .clkitm { min-height: 80px;}
 </style>
<{/block}>
 <{block name=extendjs}> 
   <script>
 	$(function(){ 
 	      var bullets = document.getElementById('abdcd').getElementsByTagName('span');
 	      var slider =  Swipe(document.getElementById('slider'), {
           auto: 3000,
           continuous: true,
           callback: function(pos) { 
              var i = bullets.length;
              while (i--) {
                bullets[i].className = ' ';
              }
              bullets[pos].className = 'on'; 
           }
        });  
}); 

</script>

 <script src="<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/js/template.min.js"></script>     
 <script>
var can_show = true;
var page = 1;
var catid = <{$typeid|default:0}>;
var order = 0;
var qsjid = 0;
var typeid = <{$typeid|default:0}>;
var myaddress = '<{$myaddress}>';
var search_input = '<{$search_input}>';
var shopshowtype  = '<{$shopshowtype}>';
var checknext = false;
$(function(){ 

	if( typeid != '' ){
		$('.kwselected').html( $(".typeid_"+typeid).attr('catename') );
		
  
			 $(".typeid_"+typeid).addClass('xz').siblings().removeClass('xz');
		   $('#toolbar').find('.se').removeClass('se');
		   $('#toolbar').find('.sh').removeClass('sh');
		   $('#supplierlist').html('');
		
		   $('#toolbar').find('li').eq(0).html('<a>'+ $(".typeid_"+typeid).text()+'<b class=""></b></a>');
		   catid = $(".typeid_"+typeid).attr('id');//alert(this).
		   can_show = true; 
		   page = 1;
		   
		   $(".kouweidiv").hide();
		   
		 
	}
	

	 
 		$('#toolbar .sele>li').bind("click", function() {   
	    $('#toolbar .sele>b').removeClass('se');
     $(this).addClass('se').siblings().removeClass('se');
     $(this).find('b').addClass('se');
      $('#toolbar .sub').addClass('sh');
       var cc = $('#toolbar .sele').find('li').index(this); 
       $('#toolbar .lizd').eq(cc).show().siblings().hide();//('sh'); 
   
      });

 	$('#sorts li').bind("click",function(){
	  $(this).addClass('xz').siblings().removeClass('xz');
	    $('#toolbar').find('.se').removeClass('se');
      $('#toolbar').find('.sh').removeClass('sh'); 
	    $('#toolbar').find('li').eq(2).html('<a>'+$(this).text()+'<b class=""></b></a>');
	    order = $(this).attr('value');
	   $('#supplierlist').html('');
      page = 1;
   	  can_show = true; 
	    shopdata(); 
  });
  $('.lizd li').bind("hover",function(){
	   $(this).addClass('tapclass').siblings().removeClass('tapclass');
  });
  $('#cuisien li').bind('click',function(){

		$('.kwselected').html( $(this).attr('catename') );
		
  
	   $(this).addClass('xz').siblings().removeClass('xz');
	   $('#toolbar').find('.se').removeClass('se');
	   $('#toolbar').find('.sh').removeClass('sh');
	   $('#supplierlist').html('');
	
	   $('#toolbar').find('li').eq(0).html('<a>'+$(this).text()+'<b class=""></b></a>');
	   catid = $(this).attr('id');//alert(this).
	   can_show = true; 
	   page = 1;
	   
	   $(".kouweidiv").hide();
	   myScroll.refresh();
	   shopdata(); 
   });
   $('#cuisienpx li').bind('click',function(){

		$('.kwselectedpx').html( $(this).attr('catename') );
		
  
	   $(this).addClass('xz').siblings().removeClass('xz');
	   $('#toolbar').find('.se').removeClass('se');
	   $('#toolbar').find('.sh').removeClass('sh');
	   $('#supplierlist').html('');
	
	   $('#toolbar').find('li').eq(0).html('<a>'+$(this).text()+'<b class=""></b></a>');
	   order = $(this).attr('orderid');//alert(this).
	   can_show = true; 
	   page = 1;
	   
	   $(".kouweidivpx").hide();
	   myScroll.refresh();
	   shopdata(); 
   });
   $('#cuisienqsj li').bind('click',function(){

		$('.kwselectedqsj').html( $(this).attr('catename') );
		
  
	   $(this).addClass('xz').siblings().removeClass('xz');
	   $('#toolbar').find('.se').removeClass('se');
	   $('#toolbar').find('.sh').removeClass('sh');
	   $('#supplierlist').html('');
	
	   $('#toolbar').find('li').eq(0).html('<a>'+$(this).text()+'<b class=""></b></a>');
	   qsjid = $(this).attr('qsjid');//alert(this).
	   can_show = true; 
	   page = 1;
	   
	   $(".kouweidivqsj").hide();
	   myScroll.refresh();
	   shopdata(); 
   });
     
   
    <{if $areaid > 0}>
   shopdata();
   <{else}>
   	
  getLocation();
   //
   $('#loading').show();
   <{/if}>
  
});
function getLocation()
  {
  	
  if (navigator.geolocation)
    { 
       navigator.geolocation.getCurrentPosition(showPosition,showError);
    }
   else{$('#showareainfo').text("浏览器不支持定位");shopdata();}
  }

function showPosition(position)
{ 

  $.getScript('http://api.map.baidu.com/geocoder/v2/?ak=<{$baidumapkey}>&callback=renderReverse&location='+position.coords.latitude+','+position.coords.longitude+'&output=json&pois=0&coordtype=wgs84ll'); 
 // $.getScript('http://api.map.baidu.com/geocoder/v2/?ak=<{$baidumapkey}>&callback=renderReverse&location=23.036989,114.3679&output=json&pois=0&coordtype=wgs84ll'); 
}
function renderReverse(datas){
	 if(datas.status == 0){  
	


	 
	 
	    $('#showareainfo').text(datas.result.formatted_address); 
		 $.ajax({
           type: 'GET', 
           url: '<{ofunc type=url link="/wxsite/saveloation/datatype/json"}>',
           async:false,
		  //  113.583413,34.742296
          // data: {'lat':23.036989,'lng':114.3679},
		   data: {'lat':datas.result.location.lat,'lng':datas.result.location.lng},
           dataType: 'json',success: function(content) { 
          	//var info = JSON.parse(content);
             // $(allobj).eq(i).find('.juliid').eq(0).text(content.msg);  
             if(content.error == false){
                 
             	shopdata();
             }else{
             	  shopdata();// alert(content.msg);
             }
	    	  },
           error: function(content) { 
         
              	shopdata();//alert('提交数据失败');
	        }
       });
		
		
		
		
	 }else{
	   shopdata();
	   $('#showareainfo').text('定位失败');
	 }
 }
  function showError(error)
  {
  	$('#showareainfo').text("定位失败");
   switch(error.code) 
    {
    	
    case error.PERMISSION_DENIED:
      //x.innerHTML="User denied the request for Geolocation."
    //  $('#showareainfo').text("User denied the request for Geolocation.");
      break;
    case error.POSITION_UNAVAILABLE:
     // x.innerHTML="Location information is unavailable."
      //$('#showareainfo').text("Location information is unavailable.");
      break;
    case error.TIMEOUT:
    //  x.innerHTML="The request to get user location timed out."
    //$('#showareainfo').text("The request to get user location timed out.");
      break;
    case error.UNKNOWN_ERROR:
     // x.innerHTML="An unknown error occurred."
     //  $('#showareainfo').text("An unknown error occurred.");
      break;
    }
    
    shopdata();
  }
   function shopdata(){ 
	  // $('#loading').show();
 	  // $(".mBxCr").show(); 
	   
 	   var url = siteurl+'/index.php?ctrl=wxsite&action=shoplistdata&areaid=<{$areaid}>&datatype=json&random=@random@';  
 	    $.ajax({ 
      dataType: "json", 
      data:{page:page,search_input:search_input,order:order,catid:catid}, 
       url: url.replace('@random@', 1+Math.round(Math.random()*1000)),  
       success: function(content) {    
       	 if(content.error == false) 
      	{ 

				if(content.msg.length > 0){

      		  		var cc = $('.clkitm').length;

					$.each(content.msg, function(i,val){     
				 
						//   var htmls = template.render('shoplist', {list:val}); 
 		                var htmls = trancertdata(val);
						$('#supplierlist').append(htmls); 
						$('.clkitm').eq(Number(i)+Number(cc)).fadeIn(); 
					});  
					page = Number(page+1);  
					$(".mBxCr").show(); 
					 $('#loading').hide();
				}else{ 
					can_show ==  false; 
					if(page == 1){ 
						error($('#supplierlist'),'未查找到满足条件的数据'); 
						$(".mBxCr").hide(); 
					}else{ 
						$('#loadtip').text('数据加载完毕'); 
					}
					$('#loading').hide();

				}

      	}else{ 
      			 can_show ==  false; 
    	       error($('#supplierlist'),content.msg); 
    	       $('#loading').hide();
      	}  
      	 
	     }, 
       error: function(content) {  
        	can_show ==  false; 
    	    error($('#supplierlist'),'店铺数据为空'); 
    	    $('#loading').hide();
	     }

     });    

}
function doshowmore(){

//屏蔽双击
	if(checknext ==  false){ 
		if(can_show == true){
			checknext = true;
			setTimeout("myyanchi()", 500 );
			shopdata();
			$(".mBxCr").hide(); 
			$('#loading').show();
		}
	}
}
function myyanchi(){ 
  		  checknext = false;
}

function trancertdata(datas){
	
	
		
	var backdata = '';
	var tempdata = 'red';
	var tempdata2 = '营业中';
	    if(datas.opentype != 2){
	    	tempdata = '#ccc';
	    	tempdata2 = '已打烊';
	    } 
		if(datas.opentype ==3){
	    	tempdata = 'green';
	    	tempdata2 = '可预订';
	    } 
	
       backdata ='<li class="clkitm " data-supplierid="'+datas.id+'" style="display:none; "  > ';
      if(datas.opentype != 2 && datas.opentype !=3){
	    	backdata += '<a href="#">';
	    }else{
	    		backdata += '<a href="'+siteurl+'/index.php?ctrl=wxsite&action=shopshow&typelx=wm&id='+datas.id+'">';
	    }
      backdata +='<img class="scrollLoading"  src="'+datas.shoplogo+'" alt="" >';
      backdata +='<h3><strong style="font-size:18px; color:#666666;">'+datas.shopname+'</strong></h3>';
	  
	  
	 if( shopshowtype == 'dingtai' ){ 
		  backdata +='<div class="qisong" style="height:12px; line-height:12px;">';
		  backdata +='<p style="border:none;">营业时间:'+datas.starttime+'</p>';
		  backdata +='</div>';
		  backdata +='<div class="address" style="height:12px; line-height:12px;">地址:'+datas.address+'</div> ';
	  
	 }else{ 
		   backdata +='<div class="qisong" style="height:12px; line-height:12px;margin-top:6px;color:#666666;">';
		  backdata +='<p>'+datas.limitcost+'&nbsp;元起送</p>';
		  backdata +='<p>送餐费&nbsp;'+datas.pscost+'&nbsp;元</p>';
		  backdata +='</div>';
		  backdata +='<div class="address" style="height:12px; line-height:12px;margin-top:8px;color:#666666;">配送时间:'+datas.starttime+'</div> ';
	  
	  
	}  
		
	if(datas.cxlist.length > 0){
	    for(var c=0;c<datas.cxlist.length;c++){
		  backdata +='<div class="address" style="font-size:12px;padding:0px; width:80%;">';
		  backdata +='<p  style="border:none; position:relative;"><img style=" margin: 0px;  padding: 0px;  position: absolute;  top: 5px;  width: 15px;  height: 15px;  float: left;  left: 0px;  border: 0px;" src="'+datas.cxlist[c].imgurl+'" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+datas.cxlist[c].name+'</p>';
		  backdata +='</div>';
		  }
	}
	/*  
      if(datas.gzdata  != ''){
           backdata +='<div class="shanbqs"> '+datas.gzdata+' </div>';
      } */
      backdata +='</a> ';
      backdata +=' <div style="position:absolute;position: absolute;background-color: '+tempdata+';height: 20px;width: 60px;right: 0px;font-size:1.2rem;margin-top: -45px;color: #ffffff;text-align: center;line-height: 20px;">'+tempdata2+'</div></li> ';
   
	 return backdata; 		
	// if(datas.is_wxcom == 1){	}
	 
	 
	
}
$(window).scroll(function(){   //滚动获取数据 
	if(can_show == true && $(".mBxCr").is(":hidden") == true){ 
    if ($(document).height() - $(this).scrollTop() - $(this).height()<50) shopdata();   
  } 
});

</script>
<script id="shoplist" type="text/html">    
 	 <li class="clkitm <^%if(list.opentype != 2&&list.opentype !=3){%^>disabled<^%}%^>" data-supplierid="<^%=list.id%^>" style="display:none;"  > 
 <^%if(list.opentype != 2&&list.opentype !=3){%^>
 	 <a href="#">
 	<^%}else{%^>
 	   <a href="<{$siteurl}>/index.php?ctrl=wxsite&action=shopshow&id=<^%=list.id%^>">
 <^%}%^>
        <img class="scrollLoading"  src="<^%=list.shoplogo%^>" alt="" >

        <h3><strong><^%=list.shopname%^></strong></h3> 
        <div class="qisong">
                <p><^%=list.limitcost%^>&nbsp;元起送</p>
                <p>送餐费&nbsp;<^%=list.pscost%^>&nbsp;元</p> 
        </div>

        <div class="address">配送时间:<^%=list.starttime%^></div> 
        
        
         <^%if(list.gzdata != ''){%^>
        <div class="shanbqs"> <^%=list.gzdata%^> </div>
        <^%}%^>
       </a>

    </li> 

</script>
<script>
	var startX = 0, startY = 0;
 
	function touchSatrtFunc(evt) {
                try
                {
                    //evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等

                    var touch = evt.touches[0]; //获取第一个触点
                    var x = Number(touch.pageX); //页面触点X坐标
                    var y = Number(touch.pageY); //页面触点Y坐标
                    //记录触点初始位置
                    startX = x;
                    startY = y; 
                 //  var text = 'TouchStart事件触发：（' + x + ', ' + y + '）';
                 //  document.getElementById("result").innerHTML = text;
                }
                catch (e) {
                   // alert('touchSatrtFunc：' + e.message);
                }
  }
	function touchMoveFunc(evt,targetname) {
    try{
                    //evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等
                    var touch = evt.touches[0]; //获取第一个触点
                    var x = Number(touch.pageX); //页面触点X坐标
                    var y = Number(touch.pageY); //页面触点Y坐标
                    //alert($(evt).html());

                  //  var text = 'TouchMove事件触发：（' + x + ', ' + y + '）';

                    //判断滑动方向
                    if (x - startX != 0) {
                        // text += '<br/>左右滑动';
                        // -的时候为向左滑动  +  向右滑动
                        var mudi = x - startX;
                     //   text += '<br/>'+mudi;
                        var oldpostion = parseInt($('#'+targetname).css('left'));
                        var nowposition = Number(oldpostion) + Number(mudi);
                        var zongchang = parseInt($('#'+targetname).css('width'));
                     //   text += '<br/>新位置'+nowposition;
                        if(nowposition > 0){
                        	$('#'+targetname).css({left:0});  
                        }else{ 
                        	var checkchang = Number(zongchang)+Number(nowposition);
                        	if(checkchang > 0){
                          $('#'+targetname).css({left:nowposition});  
                          }else{
                          	 var dochang = 200 - Number(zongchang);
                            $('#'+targetname).css({left:dochang});   
                          }
                        }
                      
                    }
                    if (y - startY != 0) {
                      //  text += '<br/>上下滑动';
                    }

                  //  document.getElementById("result").innerHTML = text;
     }catch (e) {
                  //  alert('touchMoveFunc：' + e.message);
    }
  }
  function touchEndFunc(evt) {
                try {
                    //evt.preventDefault(); //阻止触摸时浏览器的缩放、滚动条滚动等

                 //   var text = 'TouchEnd事件触发';
                //    document.getElementById("result").innerHTML = text;
                }
                catch (e) {
                  //  alert('touchEndFunc：' + e.message);
                }
  }

	function bindEvent() {
         document.getElementById('cuisien').addEventListener('touchstart', touchSatrtFunc, false); 
         document.getElementById('cuisien').addEventListener('touchmove', function(e) { touchMoveFunc(e,'cuisien'); } , false);
         document.addEventListener('touchend', touchEndFunc, false); 
  } 
	function isTouchDevice() { 
      try {
         document.createEvent("TouchEvent"); 
         bindEvent(); //绑定事件
      }
      catch (e) { 
      }
  } 
  window.onload = isTouchDevice;
 </script>
<{/block}>
<{block name=myScrolljs}>
<script>
		var myScroll, pullDownEl, pullDownOffset,pulldowncate,
	pullUpEl, pullUpOffset,
	generatedCount = 0;

function pullDownAction () {
	/*
	setTimeout(function () {	// <-- Simulate network congestion, remove setTimeout from production!
		var el, li, i;
		el = document.getElementById('thelist');

		for (i=0; i<3; i++) {
			li = document.createElement('li');
			li.innerText = 'Generated row ' + (++generatedCount);
			el.insertBefore(li, el.childNodes[0]);
		}
		
		myScroll.refresh();		// Remember to refresh when contents are loaded (ie: on ajax completion)
	}, 1000);	// <-- Simulate network congestion, remove setTimeout from production!
	*/
}

function pullUpAction () {
	setTimeout(function () {	// <-- Simulate network congestion, remove setTimeout from production!
		if(can_show == true && $(".mBxCr").is(":hidden") == true){  
        shopdata();   
    } 
		myScroll.refresh();		// Remember to refresh when contents are loaded (ie: on ajax completion)
	}, 1000);	// <-- Simulate network congestion, remove setTimeout from production!
}

function loaded() {
	pullDownEl = document.getElementById('pullDown');
	pullDownOffset = pullDownEl.offsetHeight;
	pullUpEl = document.getElementById('pullUp');	
	pullUpOffset = pullUpEl.offsetHeight;
	
	myScroll = new iScroll('wrapper', {
		hScrollbar:false, 
		vScrollbar:false,
		useTransition: true,
		topOffset: pullDownOffset,
		onRefresh: function () {
			if (pullDownEl.className.match('loading')) {
				pullDownEl.className = '';
				pullDownEl.querySelector('.pullDownLabel').innerHTML = 'Pull down to refresh...';
			} else if (pullUpEl.className.match('loading')) {
				pullUpEl.className = '';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = 'Pull up to load more...';
			}
		},
		onScrollMove: function () {
			if (this.y > 5 && !pullDownEl.className.match('flip')) {
				pullDownEl.className = 'flip';
				pullDownEl.querySelector('.pullDownLabel').innerHTML = 'Release to refresh...';
				this.minScrollY = 0;
			} else if (this.y < 5 && pullDownEl.className.match('flip')) {
				pullDownEl.className = '';
				pullDownEl.querySelector('.pullDownLabel').innerHTML = 'Pull down to refresh...';
				this.minScrollY = -pullDownOffset;
			} else if (this.y < (this.maxScrollY - 5) && !pullUpEl.className.match('flip')) {
				pullUpEl.className = 'flip';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = 'Release to refresh...';
				this.maxScrollY = this.maxScrollY;
			} else if (this.y > (this.maxScrollY + 5) && pullUpEl.className.match('flip')) {
				pullUpEl.className = '';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = 'Pull up to load more...';
				this.maxScrollY = pullUpOffset;
			}
		},
		onScrollEnd: function () {
			if (pullDownEl.className.match('flip')) {
				pullDownEl.className = 'loading';
				pullDownEl.querySelector('.pullDownLabel').innerHTML = 'Loading...';				
				pullDownAction();	// Execute custom function (ajax call?)
			} else if (pullUpEl.className.match('flip')) {
				pullUpEl.className = 'loading';
				pullUpEl.querySelector('.pullUpLabel').innerHTML = 'Loading...';				
				pullUpAction();	// Execute custom function (ajax call?)
			}
		}
	});
	pulldowncate = new iScroll('wrappercate', {
		hScrollbar:false, 
		vScrollbar:false,
		useTransition: true,
		topOffset: pullDownOffset
		
	});
	
	setTimeout(function () { document.getElementById('wrappercate').style.left = '0'; }, 800);
	setTimeout(function () { document.getElementById('wrapper').style.left = '0'; }, 800);
}

document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);

document.addEventListener('DOMContentLoaded', function () { setTimeout(loaded, 200); }, false);


</script>

<{/block}>
<{block name=sitetitle}><{$sitename}><{/block}>
<{block name=hearnav}>
   <header   id="shopheader" style="height:42px;border:none;">
   	<div class="logo" style="display:none;"><h1 class="m-icon i-etaoshi" style="background:url(http://m2.waimairen.com/upload/goods/20140524170450380.png) center no-repeat;"> </h1></div>
   	<ul class="city box_inline" style="padding: 0px;">
	<li style="width:0px;"  class="nowcity"><em data-role="city" ></em><i class="m-icon i-caret-down"></i></li>
	<li ><div class="form-item search-box" style="height:42px; line-height:42px;" id="moui_1419388732218"><span class="m-ipt" style="font-size:18px;" data-role="addr" id="showareainfo"><{if $areaid > 0}><{$mapname}><{else}>定位地址信息...<{/if}></span></div></li>
	<li style="width:auto;"><a href="<{ofunc type=url link="/wxsite/choice"}>" style="border:none;"  class="m-btn" data-role="change-btn" >切换</a></li></ul>
   	
	
	
   </header>

	
<{/block}>
<{block name=blockcontent}> 
<style>
.branch-list li img.scrollLoading {
width: 60px;
height: 60px;
position: absolute;
left: 10px;
top: 13px;
padding: 2px;
border: 1px solid #e5e5e5;
}
.branch-list li{ border:none; border-bottom:1px solid #eaeaea; margin:10px; padding-top:0px;}
.branch-list li img.scrollLoading{ left:0px; top:3px;border:0px; padding:0px ;margin:0px; width:80px;}
#cuisien{padding:0px;}
#cuisien li{ text-align:center;width:100%;clear:both;display: block; height:40px; line-height:40px; padding:0px; margin:0px;}
.kouweixz{ width:33.3%; float:left;background:#fff; font-size:14px;  height:41px; line-height:41px; border-bottom:1px solid #d9d9d9; text-align:center; color:#0088cc; border-right:1px solid #e5e5e5;}
.kouweixzpx{ width:33.3%; float:left;background:#fff; font-size:14px;  height:41px; line-height:41px; border-bottom:1px solid #d9d9d9; text-align:center; color:#0088cc; border-right:1px solid #e5e5e5;}
.kouweixzqsj{ width:33.3%; float:left;background:#fff; font-size:14px;  height:41px; line-height:41px; border-bottom:1px solid #d9d9d9; text-align:center; color:#0088cc; border-right:1px solid #e5e5e5;}
.kwselected{width:90%; margin:0 auto;}
.kwselectedpx{width:90%; margin:0 auto;}
.kwselectedqsj{width:90%; margin:0 auto;}
.kouweiwx{background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/images/kouweiBg11.png) #ffffff right center no-repeat; color:#323232; font-size:14px; font-weight:normal;}
.kouweiwxpx{background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/images/kouweiBg11.png) #ffffff right center no-repeat; color:#323232; font-size:14px; font-weight:normal;}
.kouweiwxqsj{background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/images/kouweiBg11.png) #ffffff right center no-repeat; color:#323232; font-size:14px; font-weight:normal;}
.kouweiokERR{background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/images/kouweiseBg.png) #ffffff right center no-repeat;}
.kouweidiv{ display:none;width:33.3%;background:#ffffff; position:absolute;z-index:999; top:85px; left:0px; border:1px solid #d9d9d9; }
.kouweidivpx{ display:none;width:33.3%;background:#ffffff; position:absolute;z-index:999; top:85px; left:33.3%; border-bottom:1px solid #d9d9d9; }
#cuisienpx{padding:0px;}
#cuisienpx li{ text-align:center;width:100%;clear:both;display: block; height:40px; line-height:40px; padding:0px; margin:0px;border: 1px solid #e5e5e5; background:#fff;font-size: 1.5rem;}
.kouweidivqsj{ display:none;width:33.3%;background:#ffffff; position:absolute;z-index:999; top:85px; left:66.6%; border-bottom:1px solid #d9d9d9; }
#cuisienqsj{padding:0px;}
#cuisienqsj li{ text-align:center;width:100%;clear:both;display: block; height:40px; line-height:40px; padding:0px; margin:0px;border: 1px solid #e5e5e5; background:#fff;font-size: 1.5rem;}
#cuisienpx li.xz {
  background-color: #fe5052;
  color: #fff;
}
#cuisienpx li.xz a {
  color: #fff;
}
#cuisienqsj li.xz {
  background-color: #fe5052;
  color: #fff;
}
#cuisienqsj li.xz a {
  color: #fff;
}
</style>



 <div id="wrapper" style="margin-top:0px;bottom:0px;top:40px;">
	<div id="scroller">
		
			<div>
	 
				<div class="wxmenulist" style="margin-top:-10px;margin-bottom:-10px;" > 
			<ul>
			
			
			
			<{foreach from=$moretypelist item=items}>
				<li style="background:url(<{$items['img']}>) center no-repeat; background-size:60%;"  <{if $items['activity'] == 'waimai' }>  onclick="dolink('<{ofunc type=url link="/wxsite/waimai/typeid/<{$items['param']}>"}>');"  <{else}>  onclick="dolink('<{ofunc type=url link="/wxsite/marketlist/typeid/<{$items['param']}>"}>');"  <{/if}> >
					<div style="min-height:40px; width:100%;">
						<!--  <img src="<{$items['img']}>" />  -->
				</div> 
					<div style="margin-top:28px; font-size:13px;"><{$items['name']}></div>
					
				</li>
				
			<{/foreach}>
			 
				<li style="background:url(<{$siteurl}>/templates/<{$tempdir}>/public/wxsite/css/images/tab_home_ic_all.png) center no-repeat; background-size:60%;"   onclick="dolink('<{ofunc type=url link="/wxsite/waimai"}>');"  >
				<div style="min-height:40px; width:100%;"></div>
					<div style="margin-top:28px;font-size:13px;">全部</div>
				</li>
			</ul>
		</div>

			<div class="wxgongnengset" style="margin:10px auto; padding:10px 0px;"> 
			<ul>
				<{foreach from=$moduleshow item=items}>
				<li  <{if count($moduleshow) == 1  }>style="width:100%"<{elseif count($moduleshow) == 2}>style="width:50%"<{elseif count($moduleshow) ==3}>style="width:33%"<{/if}> onclick="dolink('<{ofunc type=url link="/wxsite/<{$items['name']}>"}>');"  >
						<div class=""><img style=" width:100%; height:42px;" src="<{$items['imgurl']}>" /></div>
				</li>	
				<{/foreach}>
				
				
			</ul>
		</div>

			
			
	</div>
	
		<div class="clear"></div>
              <!--首页幻灯-->
                <section id="slider" class="swipe" style="visibility: visible;">
  				<div class="swipe-wrap">
  				  <{load_data assign="list" table="adv"    fileds="*"  limit="5" where="advtype='weixinlb' and  module='<{$sitetemp}>' " }> 
  				  <{foreach from=$list['list'] item=items}>
  				 <div class="wrap" ><a href="<{$items['linkurl']}>"><img src="<{$items['img']}>" width="100%" height="100" alt=""></a> </div> 
  				  <{/foreach}>
  				</div>
  			 <div class="bgboxgo">
  						<div class="botton-box mBxCm" id="abdcd">
  							 <{foreach from=$list['list'] item=items}>
  							    <span class="on"></span>
  							 <{/foreach}>
  					 </div>
  				</div>
  			</section>
                    	<div class="wxgongnengset" style="margin:10px auto; padding:0px 0px;"> 
			<ul>
				<{foreach from=$fourmoduleshow item=items}>
				<li <{if $items['name']=='market' }> onclick="dolink('<{ofunc type=url link="/wxsite/marketlist"}>');" <{elseif $items['name']=='diancai'}> onclick="dolink('<{ofunc type=url link="/wxsite/dingtai"}>');"<{else}> onclick="dolink('<{ofunc type=url link="/wxsite/<{$items['name']}>"}>');" <{/if}> 
				<{if count($moduleshow) == 1  }>style="width:100%"<{elseif count($moduleshow) == 2}>style="width:50%;height:80px; line-height:80px;border:none;border-bottom: 1px solid #eeeeee;"
					<{elseif count($moduleshow) == 3}>style="width:50%;height:80px; line-height:80px;border:none;border-bottom: 1px solid #eeeeee;"
					<{elseif count($moduleshow) == 4}>style="width:50%;height:80px; line-height:80px;border:none;border-bottom: 1px solid #eeeeee;"<{/if}>  onclick="dolink('<{ofunc type=url link="/wxsite/<{$items['name']}>"}>');"  >
						<img style=" width:100%; height:80px;" src="<{$items['imgurl']}>" />
				</li>	
				<{/foreach}>
				
				
			</ul>
		</div>
<div class="clear"></div>
  


<h2 style="background:none; margin:10px 0px; border-left:4px solid #ff1552; color:#333333; font-weight:bold; padding-left:6px; height:20px; line-height:20px; font-size:20px;">附近商家</h2>

		<div id="pullDown" style="display:none;">
			<span class="pullDownIcon"></span><span class="pullDownLabel">Pull down to refresh...</span>
		</div>
		
   

  <div id="result"></div>

  <div class="container" id="relist">

  	<section>

  		

  		<ul id="supplierlist" class="branch-list">  

  			 

     </ul>

     <div class="mBxCr" style="display: none;  background-color: #E6E6E6; width:98%; margin:0 auto; height: 40px;  line-height: 40px;  text-align: center;" onclick="doshowmore();"><span class="more" id="loadtip" style="font-size:16px;">点击查看更多商家</span></div>

    </section>
  </div>
   
   <div id="pullUp" style="display:none;">
			<span class="pullUpIcon"></span><span class="pullUpLabel">Pull up to refresh...</span>
		</div>
   
   
   
</div>
</div>
<{/block}>